package com.jysz.struts2.views.jsp.ui;
/**
 * 权限验证标签
 * @author xuxiaolong
 */
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.jysz.struts2.components.PermissionComponent;
import com.opensymphony.xwork2.util.ValueStack;
  
public class PermissionTag extends ComponentTagSupport {   
  
    private static final long serialVersionUID = 1631842497771460718L;   
  
    private String code;   
  
    @Override  
    public Component getBean(ValueStack stack, HttpServletRequest request,   
            HttpServletResponse arg2) {   
        return new PermissionComponent(stack, request);   
    }   
  
    @Override  
    protected void populateParams() {   
        super.populateParams();   
        PermissionComponent pct = (PermissionComponent) component;
        pct.setCode(code);
    }  

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}  
